<include file="common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('members/member_list')}">会员列表</a>
</div>
<div class="permissions-content">
    <form class="form-horizontal" id="memberForm" action="{:U('Members/member_edit')}" method="post">
        <div class="permissions-le">
            <span class="add-admin"><a href="javascript:history.go(-1)"></a>编辑会员信息</span>
            <div class="add-admin-ipt">
                <span><i>*</i>会员名称:</span>
                <input type="text" id="mem_name" name="mem_name" placeholder="请填写会员姓名" class="w200" value="{$agent['agent_name']}"/>
            </div>
            <div class="add-admin-ipt">
                <span><i>*</i>手机号:</span>
                <input type="text" value="{$agent['mobile']}" disabled class="w200"/>
            </div>
            <div class="add-admin-ipt">
                <span>&nbsp;&nbsp;&nbsp;&nbsp;邮箱:</span>
                <input type="text" name="email" id="mem_email" placeholder="请填写会员邮箱" class="w200"/>
            </div>
            <div class="add-admin-ipt">
                <span><i>*</i>密码:</span>
                <input type="text" name="npwd" placeholder="如需修改密码请填写" class="w200"/>
            </div>
            <div class="add-admin-ipt">
                <span></span>
                <input type="hidden" name="agent_id" value="{$agent['agent_id']}"/>
                <a class="btn-lg btn-blue" id="submitBtn">保存</a>
            </div>
        </div>
    </form>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>

</div>
<script type="text/javascript">
    $(function(){
        $('#submitBtn').click(function () {
            var mem_name = $('#mem_name').val();
            var mem_email = $('#mem_email').val();
            if(!mem_name){
                layer.alert('请输入会员名称');
                return false;
            }
            if(mem_email && !checkEmail(mem_email)){
                layer.alert('邮箱格式不正确');
                return false;
            }
            $("#memberForm").submit();
        });

    });
</script>
<include file="common:__foot__"/>